EMT Practice Test

1. Question Content...


Question List

Question1: You are reviewing a Magento module and see a directory named Service.
What can you determine from this directory's name?

Question2: Magento allows you to specify custom values per store for product attributes created in the admin panel.
Which architectural pattern makes it possible?

Question3: You have created a module controller that responds to the following URL: /mycompany/product/load/id/123.
Which two methods will load the product model by ID as specified in the URL? (Choose two.)

Question4: You are building a report using complex SQL aggregations to locate the required data.
In what type of class do you put these SQL statements?

Question5: A client has asked you to include category url keys in product URLs.
How is this done?

Question6: You are reviewing a theme in app/design/frontend/MyCompany/MyTheme and see the file etc/view.xml.
What is the function of this file?

Question7: Assume that $collection is a new instance of a class that extends
Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids.
How do you select a list of records from the database where the record ids are in the $ids list?

Question8: Where do you change the frontName for the admin router?

Question9: A merchant requires the ability to configure contact information for their brick and mortar stores as a CSV file upload. The module already exists and contains an etc/adminhtml/system.xml file where the new field can be added.
How do you specify the class that will process the uploaded file?

Question10: You got a notification about error that occurred on a production environment. The merchant gave you the error identifier.
How do you find the error message based on the identifier?

Question11: During a code review of a module MyCompany_PaymentCurrencies you see a configuration field declared in the file etc/adminhtml/system.xml:

What is the consequence of the attribute showInStore being set to 0?

Question12: A merchant is interested in setting different prices for the same products in different store scopes.
What do you reply to this inquiry?

Question13: You have added a new attribute origin of the type varchar to the product entity.
Which two calls will filter a product collection with origin set to "California"? (Choose two.)

Question14: You are setting up a brand new Magento installation for a merchant who is migrating from Magento 1 to Magento 2.
Keeping in mind upgradability and the need to customize, which one do you choose?

Question15: You are adding an entry to the backend menu. To do so you open a core etc/adminhtml/menu.xml file as a reference. In the file you see the node:

What is the result of specifying resource="Magento_Catalog::catalog"?

Question16: The constructor function for \Magento\Catalog\Model\Category contains this excerpt:

With the automatic dependency injection that Magento provides, how is the StoreManagerInterface resolved?

Question17: You added a plugin declaration to MyCompany/MyModule/etc/di.xml:

What will be the effect of this declaration?

Question18: In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js. The Magento base URL is https://magento.host/ and the luma theme with the en_US locate is used.
What is the public URL for this file?

Question19: A custom module needs to log all calls of \Magento\Customer\Api\AddressRepositoryInterface::save().
Which mechanism do you use?

Question20: You are working on a new entity called vendor. You implemented the model, resource model and collection.
You want to ensure that standard model events will be fired for your model, so an observer can be created for the events vendor_save_after, vendor_save_commit_after and others.
How do you do that?

Question21: A module you are working on needs to send a newsletter to all subscribed customers at predefined intervals.
Which two actions do you take to make sure the newsletter is sent? (Choose two.)

Question22: How do you add a new link into the My Account sidebar?

Question23: You are tasked to install an extension to the merchant's Magento instance.
The extension is developed by the company called MyCompany and its codebase is available from all four locations listed below.
Which two installations options do you choose from to prevent version conflicts during upgrade? (Choose two.)

Question24: You are adding a child node to the product.info block using the XML:

How will this block be rendered?

Question25: What order operation is available in the My Account section in the storefront?

Question26: Your module adds a new controller class which will return a JSON response.
What will be the return type of the execute method?

Question27: A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or more billing addresses.
How is this implemented?

Question28: A merchant sells shoes with multiple variations such as a color and size. A shoe is represented by a configurable product. There are seven different colors and four sizes.
What is the minimal amount of simple products that represent a combination of color and size needs to be created in order to make a shoe salable?

Question29: You are adding a new entry to the backend menu that appears after
Marketing > SEO & Search > Site Map
You see the existing site map menu item is declared by the node:

What two actions do you take to configure the new menu entry location? (Choose two.)

Question30: What is the difference between online and offline shipping methods?

Question31: A module MyModule needs to send notifications to customers only when the account was modified from a mobile app using the REST web APIs.
You decided to implement an observer for customer_save_after_data_object event.
In which file do you declare the observer?

Question32: You have loaded an instance of Magento\Catalog\Model\Product in the $product variable. You know that the loaded product has the type configurable with four variations. These variations have the prices: $10, $12, $12,
$15.
What will be the result of the $product->getFinalPrice() call?

Question33: You have created a custom module which must perform an action immediately after an order is placed, but only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target event which the module will observe.
In which file will the event observer be declared?

Question34: How do you add a foreign key to an existing table created by another module?

Question35: Which entity in Magento supports scoped attributes?

Question36: You have been given the task of importing products from an external source. You decide to create a custom module to do this. The class handling the import creates a product for each record, sets the data on it and saves it to the database.
What do you inject into a constructor to represent each product you create?

Question37: What is the connection between product attribute sets and categories?

Question38: What is the relationship between products and categories in Magento?